package com.doudou.collection.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.doudou.collection.orm.entity.Role;
import com.doudou.collection.orm.vo.RoleSimpleVO;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * className: RoleMapper<br>
 * description: TODO<br>
 * author: 李浩文<br>
 * date: 2023/6/20 20:42<br>
 * version: 1.0<br>
 */
@Repository
public interface RoleMapper extends BaseMapper<Role> {

    /**
     * 通过id查找用户的角色(管理员)
     */
    List<RoleSimpleVO> getRoleByAdminUserId(Long id);

    /**
     * 通过id查找用户的角色(普通用户)
     */
    List<RoleSimpleVO> getRoleByUserId(Long id);
}
